﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WHControlLib.CommonHelpers;
using WHUIdemo.Forms.PosDemoPageFrm;

namespace WHUIdemo
{
    public partial class CtrlTestFrm : Form
    {
        public CtrlTestFrm()
        {
            InitializeComponent();
        }
        public List<VIPMember> VipMemberList = new List<VIPMember>();
        private void button1_Click(object sender, EventArgs e)
        {

            //DataTable Dt=new DataTable();
            // Dt.Columns.Add("姓名");
            // Dt.Columns.Add("年龄");
            // Dt.Columns.Add("年龄2");
            // Dt.Columns.Add("年龄3");
            // Dt.Rows.Add(new string[] { "wh", "35", "35", "35" });
            // Dt.Rows.Add(new string[] { "ww", "18", "35", "35" });
            // Dt.Rows.Add(new string[] { "wh", "35", "35", "35" });
            // Dt.Rows.Add(new string[] { "ww", "18", "35", "35" });
            // Dt.Rows.Add(new string[] { "ww", "18", "35", "35" });
            // Dt.Rows.Add(new string[] { "wh", "35", "35", "35" });
            // Dt.Rows.Add(new string[] { "ww", "18", "35", "35" });

            //Dt.Rows.Add(new Button[] { new Button() { Text="欧克"} });
             

            for (int i = 0; i < 10; i++)
            {
                VIPMember vip = new VIPMember();
                vip.MemberID = "1000" + i.ToString();
                vip.MemberName = "会员" + i.ToString();
                vip.MemberCardID = "88" + i.ToString();
                vip.MemberPhone = "1378150" + i.ToString();
                vip.MemberDiscount = "会员价";
                VipMemberList.Add(vip);

            }

            dataGridView1.DataSource= VipMemberList;
            //whDataGridView1.DataSource = VipMemberList;



            //whDataGridView1.AddButtonColumn("按钮行", "Button", 70, false);



        }

        private void button2_Click(object sender, EventArgs e)
        {
            Graphics g=this.CreateGraphics();
            using (Pen pp = new Pen(Color.Red))
            {
                pp.Width = 20;
                pp.StartCap = LineCap.Round;
                pp.EndCap = LineCap.Round;

                
                g.DrawLine(pp, new Point((int)pp.Width/2, 0), new Point(200, 0));
            }
        }
     ComputerInfoHelper compInfo = new ComputerInfoHelper();
        private void whButton1_Click(object sender, EventArgs e)
        {
       

           
            string aa = "sde";
            whLable1.Text = "ddd";

        }
        string s;
        private void button3_Click(object sender, EventArgs e)
        {
         
            whLable1.Text = s;
            
        }

        private void CtrlTestFrm_Load(object sender, EventArgs e)
        {
s= compInfo.GetCpuID();
        }  
    }
}
